package cn.edu.zxj.springblog.model;

import cn.edu.zxj.springblog.utils.DateUtil;
import lombok.Data;

import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * Description：博客信息相关的实体类
 *
 * @author: zxj
 * @date: 2024-02-04
 * @time: 17:42:19
 */
@Data
public class BlogInfo {
    private Integer id;
    private String title;
    private String content;
    private Integer userId;
    private Integer deleteFlag;
    private Date createTime;
    private Date updateTime;
    private Integer loginUser;


    public String getCreateTime() {
        if (createTime == null) return "";
        return DateUtil.dateFormat(createTime);
    }

    public String getUpdateTime() {
        if (updateTime == null) return "";
        return DateUtil.dateFormat(updateTime);
    }
}
